#ifndef TRANSLINEAL_H
#define TRANSLINEAL_H

#include <QtGui>
#include "ui_transLineal.h"
#include "Graficas2D.h"
#include <iostream>

#include <qwt_plot.h>
#include <qwt_plot_curve.h>

#include <qlist.h>
#include <qstring.h>
#include <QIntValidator>

#include "punto.h"

using namespace std;

typedef QList<QDoubleSpinBox*> listaSpin;

class TransLineal : public QDialog
{
    Q_OBJECT

public:
    TransLineal(QWidget *parent = 0);
    ~TransLineal();
    QList <QLine> getLineas();

private:
	static const int NUMCOLORES = 256;
	static const int MAXTABLA = 255;
    Ui::TransLinealClass ui;
    QList <QLine> lineas;

    Graficas2D grafica;
    listaSpin spinx;
    listaSpin spiny;
    QDoubleSpinBox* nuevoSpin();

    QwtPlot* plot;
    QwtPlotCurve * linea;

    void getArrays(double * vx , double * vy);


private slots:
   void addPoint();
   void deletePoint();
   void previsualizar();

public slots:
   void aceptar();

};



#endif // TRANSLINEAL_H
